package cn.com.blueInfo.bpm.person.convert;

import cn.com.blueInfo.bpm.common.convert.BaseConvert;
import cn.com.blueInfo.bpm.person.entity.OrganizeLevel;
import cn.com.blueInfo.bpm.person.request.OrganizeLevelDTO;
import cn.com.blueInfo.bpm.person.response.OrganizeLevelVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * 组织级别表 对象转换
 * @author suxch
 * @since 2025-08-31 16:18:02
 */
@Mapper(componentModel = "spring")
public interface OrganizeLevelConvert
        extends BaseConvert<OrganizeLevel, OrganizeLevelDTO, OrganizeLevelVO> {

    OrganizeLevel dtoToEntity(OrganizeLevelDTO dto);

    OrganizeLevel dtoToEntity(OrganizeLevelDTO.UpdatePartialDTO dto);

    @Mapping(source = "status", target = "status", qualifiedByName = "enumToDesc")
    @Mapping(source = "deleted", target = "deleted", qualifiedByName = "enumToDesc")
    @Mapping(source = "levelType", target = "levelType", qualifiedByName = "enumToDesc")
    OrganizeLevelVO entityToVO(OrganizeLevel entity);

}